package cn.littlehx.spring_boot_test2_2.repository;

import cn.littlehx.spring_boot_test2_2.domain.Student;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface StudentRepository extends JpaRepository<Student,Integer> {
    /**
     * 按名字进行查询
     * @param name
     * @return
     */
    List<Student> findByNameLike(String name);

    /**
     * 按名字和密码进行查询
     * @param name
     * @param password
     * @return
     */
    //注意中间要加and
    List<Student> findByNameAndPassword(String name, String password);

}
